package top.lixunda.ecommerce.server.good.api.entity.db;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用于保存图片或文件，保存的图片或文件可以多次使用
 * </p>
 *
 * @author Xumda
 * @since 2020-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("file_collection")
@ApiModel(value = "FileCollectionDO对象",
        description = "用于保存图片或文件，保存的图片或文件可以多次使用")
public class FileCollectionDO extends Model<FileCollectionDO> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "名称，用于标志一类文件")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "文件地址")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "文件文件详细数据编号")
    @TableField("file_id")
    private Integer fileId;

    @ApiModelProperty(value = "文件类型")
    @TableField("file_type")
    private String fileType;

    @ApiModelProperty(value = "版本号")
    @TableField("version")
    private Integer version;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人员编号")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人员名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建人员类型，USER STORE ADMIN")
    @TableField("create_user_type")
    private String createUserType;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
